<?php

use Illuminate\Database\Migrations\Migration;

class CreateCanboTable extends Migration
{
    /**
    * Run the migrations.
    *
    * @return void
    */
    public function up()
    {
        Schema::create('can_bo', function($table)
        {
            $table->engine='InnoDB';
            $table->increments('id')->unsigned();
            $table->integer('id_nguoi_dung')->unsigned();
            $table->integer('id_bo_mon')->unsigned();
            $table->string('mscb', 10)->unique();
            $table->string('ho', 50);
            $table->string('ten', 10);
            $table->string('sdt_dd', 15)->nullable()->default(null);
            $table->string('sdt_cd', 15)->nullable()->default(null);
            $table->boolean('gioi_tinh');
            $table->date('ngay_sinh');
            $table->string('email', 256);
        });
    }

    /**
    * reverse the migrations.
    *
    * @return void
    */
    public function down()
    {
        Schema::drop('can_bo');
    }
}